import Vue from 'vue'
import Router from 'vue-router'
import Regist from '@/page/regist-login/regist.vue'
import Login from '@/page/regist-login/login.vue'
import LoginShopAdmin from '@/page/regist-login/login-shop-admin.vue'
import ChooseShop from '@/page/shop/choose-shop.vue'
import Member from '@/page/member/index.vue'
import MemberList from '@/page/member/member-list.vue'
import SingleBuyList from '@/page/member/single-buy-list.vue'
import CustomBuyList from '@/page/member/custom-buy-list.vue'

import ManagerIndex from '@/page/manager/index.vue'
import SetSubManager from '@/page/manager/set-sub-manager.vue'
import SubManagerDetail from '@/page/manager/sub-manager-detail.vue'
import wxAuthPage from '@/page/manager/wx-authorization.vue'

import WxManagerIndex from '@/page/wxmanager/index.vue'
import WxSetSubManager from '@/page/wxmanager/set-sub-manager.vue'
import WxSubManagerDetail from '@/page/wxmanager/sub-manager-detail.vue'
import WxwxAuthPage from '@/page/wxmanager/wx-authorization.vue'


import outborder from '@/page/outborder/index.vue'
// import outborderOnline from '@/page/outborder/online.vue'
import outborderOutline from '@/page/outborder/outline.vue'
import outborderSet from '@/page/outborder/set.vue'
import material from '@/page/outborder/material.vue'
import materialList from '@/page/outborder/material-list.vue'
import materialDetail from '@/page/outborder/material-detail.vue'


import outborder2 from '@/page/innerborder/index.vue'
// import outborderOnline2 from '@/page/innerborder/online.vue'
import outborderOutline2 from '@/page/innerborder/outline.vue'
import outborderSet2 from '@/page/innerborder/set.vue'
// import material2 from '@/page/innerborder/material.vue'
// import materialList2 from '@/page/innerborder/material-list.vue'
// import materialDetail2 from '@/page/innerborder/material-detail.vue'


import outCard from '@/page/outCard/index.vue'
// import outCardOnline from '@/page/outCard/online.vue'
import outCardOutline from '@/page/outCard/outline.vue'
import outCardSet from '@/page/outCard/set.vue'
import cardmaterial from '@/page/outCard/material.vue'
import cardmaterialList from '@/page/outCard/material-list.vue'
import cardmaterialDetail from '@/page/outCard/material-detail.vue'


import centerCard from '@/page/centerCard/index.vue'
// import centerCardOnline from '@/page/centerCard/online.vue'
import centerCardOutline from '@/page/centerCard/outline.vue'
import centerCardSet from '@/page/centerCard/set.vue'
// import centerCardmaterial from '@/page/centerCard/material.vue'
// import centerCardmaterialList from '@/page/centerCard/material-list.vue'
// import centerCardmaterialDetail from '@/page/centerCard/material-detail.vue'

import innerCard from '@/page/innerCard/index.vue'
// import innerCardOnline from '@/page/innerCard/online.vue'
import innerCardOutline from '@/page/innerCard/outline.vue'
import innerCardSet from '@/page/innerCard/set.vue'
// import innerCardmaterial from '@/page/innerCard/material.vue'
// import innerCardmaterialList from '@/page/innerCard/material-list.vue'
// import innerCardmaterialDetail from '@/page/innerCard/material-detail.vue'

Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   redirect: { name: 'SubManagerDetail' }
    // },
    {
      path: '/regist',
      name: 'Regist',
      component: Regist
    },
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/login/shopAdmin',
      name: 'LoginShopAdmin',
      component: LoginShopAdmin
    },
    {
      path: '/choose/shop',
      name: 'ChooseShop',
      component: ChooseShop
    },
    {
      path: '/member',
      name: 'Member',
      component: Member
    },
    {
      path: '/member/list',
      name: 'MemberList',
      component: MemberList
    },
    {
      path: '/member/singlebuylist',
      name: 'SingleBuyList',
      component: SingleBuyList
    },
    {
      path: '/member/custombuylist',
      name: 'CustomBuyList',
      component: CustomBuyList
    },
    {

      path: '/manager',
      name: 'ManagerIndex',
      component: ManagerIndex,
      redirect: { name: 'SubManagerDetail' },
      children: [{
        path: '/manager/setsub',
        name: 'SetSubManager',
        component: SetSubManager
      }, {
        path: '/manager/detail',
        name: 'SubManagerDetail',
        component: SubManagerDetail
      },{
        path: '/manager/authorization',
        name: 'wxAuthPage',
        component: wxAuthPage
      }]
    },
    {
      path: '/wxmanager',
      name: 'WxManagerIndex',
      component: WxManagerIndex,
      redirect: { name: 'WxSubManagerDetail' },
      children: [{
        path: '/wxmanager/setsub',
        name: 'WxSetSubManager',
        component: WxSetSubManager
      }, {
        path: '/wxmanager/detail',
        name: 'WxSubManagerDetail',
        component: WxSubManagerDetail
      },{
        path: '/wxmanager/authorization',
        name: 'WxwxAuthPage',
        component: WxwxAuthPage
      }]
    },
    {
      path: '/outborder',
      name: 'outborder',
      component: outborder,
      redirect: { name: 'outborderOutline' },
      children: [
      //   {
      //   path: '/outborder/online',
      //   name: 'outborderOnline',
      //   component: outborderOnline
      // },
        {
        path: '/outborder/outline',
        name: 'outborderOutline',
        component: outborderOutline
      }, {
        path: '/outborder/set',
        name: 'outborderSet',
        component: outborderSet
      }]
    },
    {
      path: '/material',
      name: 'material',
      component: material,
      redirect: { name: 'materialList' },
      children: [{
        path: '/material/list',
        name: 'materialList',
        component: materialList
      }, {
        path: '/material/detail',
        name: 'materialDetail',
        component: materialDetail
      }]
    },
    {
      path: '/outborder2',
      name: 'outborder2',
      component: outborder2,
      redirect: { name: 'outborderOutline2' },
      children: [
      //   {
      //   path: '/outborder/online2',
      //   name: 'outborderOnline2',
      //   component: outborderOnline2
      // },
        {
        path: '/outborder/outline2',
        name: 'outborderOutline2',
        component: outborderOutline2
      }, {
        path: '/outborder/set2',
        name: 'outborderSet2',
        component: outborderSet2
      }]
    },
    // {
    //   path: '/material2',
    //   name: 'material2',
    //   component: material2,
    //   redirect: { name: 'materialList2' },
    //   children: [{
    //     path: '/material/list2',
    //     name: 'materialList2',
    //     component: materialList2
    //   }, {
    //     path: '/material/detail2',
    //     name: 'materialDetail2',
    //     component: materialDetail2
    //   }]
    // },
    {
      path: '/outCard',
      name: 'outCard',
      component: outCard,
      redirect: { name: 'outCardOutline' },
      children: [
      //   {
      //   path: '/outCard/online',
      //   name: 'outCardOnline',
      //   component: outCardOnline
      // },
        {
        path: '/outCard/outline',
        name: 'outCardOutline',
        component: outCardOutline
      }, {
        path: '/outCard/set',
        name: 'outCardSet',
        component: outCardSet
      }]
    },
    {
      path: '/outCard/material',
      name: 'outCardmaterial',
      component: cardmaterial,
      redirect: { name: 'outCardmaterialList' },
      children: [{
        path: '/outCardmaterial/list',
        name: 'outCardmaterialList',
        component: cardmaterialList
      }, {
        path: '/outCardmaterial/detail',
        name: 'outCardmaterialDetail',
        component: cardmaterialDetail
      }]
    },
    {
      path: '/centerCard',
      name: 'centerCard',
      component: centerCard,
      redirect: { name: 'centerCardOutline' },
      children: [
      //   {
      //   path: '/centerCard/online',
      //   name: 'centerCardOnline',
      //   component: centerCardOnline
      // },
        {
        path: '/centerCard/outline',
        name: 'centerCardOutline',
        component: centerCardOutline
      }, {
        path: '/centerCard/set',
        name: 'centerCardSet',
        component: centerCardSet
      }]
    },
    // {
    //   path: '/centerCard/material',
    //   name: 'centerCardmaterial',
    //   component: centerCardmaterial,
    //   redirect: { name: 'centerCardmaterialList' },
    //   children: [{
    //     path: '/centerCardmaterial/list',
    //     name: 'centerCardmaterialList',
    //     component: centerCardmaterialList
    //   }, {
    //     path: '/centerCardmaterial/detail',
    //     name: 'centerCardmaterialDetail',
    //     component: centerCardmaterialDetail
    //   }]
    // },
    {
      path: '/innerCard',
      name: 'innerCard',
      component: innerCard,
      redirect: { name: 'innerCardOutline' },
      children: [
      //   {
      //   path: '/innerCard/online',
      //   name: 'innerCardOnline',
      //   component: innerCardOnline
      // },
        {
        path: '/innerCard/outline',
        name: 'innerCardOutline',
        component: innerCardOutline
      }, {
        path: '/innerCard/set',
        name: 'innerCardSet',
        component: innerCardSet
      }]
    },
    // {
    //   path: '/innerCard/material',
    //   name: 'innerCardmaterial',
    //   component: innerCardmaterial,
    //   redirect: { name: 'innerCardmaterialList' },
    //   children: [{
    //     path: '/innerCardmaterial/list',
    //     name: 'innerCardmaterialList',
    //     component: innerCardmaterialList
    //   }, {
    //     path: '/innerCardmaterial/detail',
    //     name: 'innerCardmaterialDetail',
    //     component: innerCardmaterialDetail
    //   }]
    // }
  ]
})
